from django.contrib import admin
from django.contrib.contenttypes import generic
from lists.models import List, Item, ListMembership, Photo, PhotoItem, OList
from tagging.models import GenericTag

admin.site.register(Item)
admin.site.register(ListMembership)
admin.site.register(Photo)
admin.site.register(PhotoItem)
admin.site.register(OList)


class PhotoItemInline(generic.GenericTabularInline):
    model = PhotoItem

class TagInline(generic.GenericTabularInline):
    model = GenericTag
    
class ListAdmin(admin.ModelAdmin):
    inlines = [
        TagInline,
        PhotoItemInline,
    ]

admin.site.register(List,ListAdmin)